<?php
session_start();
header("content-type:text/html; charset=utf-8");
require_once("../../utils/conn.php");

    $db = new mysql_db();
    $findMF="select myfocuser from myfocus where familyNum='".$_SESSION['family_current']."'";
    $myMF=$db->data($findMF);
     if($myMF["total"]<=0){
         echo ($db->createJson(false,"","system error"));
     }else{
     $myFocus=array(); //array for foreach
     $myFocus_data=array(); //myforuser content
     if($myMF["data"][0]["myfocuser"]){
       $myFocus_data= explode("|",$myMF["data"][0]["myfocuser"]);
     }
      if($myFocus_data[0]==""){
          echo ($db->createJson(false,"","0"));
      }else{
        foreach ($myFocus_data as $value) {
                 $findMB="select * from member where nickname='".$value."'";
                 $memberInfo=$db->data($findMB);//$memberInfo 单个用户信息
                //$tagArr=$tagArr==""?"":json_encode($tagArr);
                foreach($memberInfo["data"] as $val){
                     $myFocus[]='{"familyNum":"'.$val["familyNum"].'","faceImg":"'.$val["faceImg"].'","nickname":"'.$val["nickname"].'"}';
                }
              }
               echo($db->createJson(true,json_encode($myFocus),"success"));
      }
     }
?>